package Entities;

public class GraphicEntity {
	
	public EntityType entityType;
	
	//Position
	public float x;
	public float y;
	public float z;
	
	//Velocity
	public float vx;
	public float vy;
	public float vz;
	
	public boolean IsCollisioning(GraphicEntity target)
	{
		//Calculate the euclidean distance vector to determine if the object is colliding
		float dx = this.x-target.x;
		float dy = this.y-target.y;
		float dz = this.z-target.z;
		
		return (Math.sqrt(Math.pow((double)dx, 2) + Math.pow((double)dy, 2)+ Math.pow((double)dz, 2)) <= 1.0);
	}
	
	public void Move()
	{
		this.x += this.vx;
		this.y += this.vy;
		this.z += this.vz;
	}

}
